package com.mxpio.erp.common.equipment.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_EQP_BASICS_REMARK")
@Schema(description="设备(实例/资产)信息-重要备注")
public class EquipmentEqpBasicsRemark extends BaseEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "主键")
    private String id;

    @Column(name = "BASICS_CODE_")
    @Schema(description = "资产编号")
    private String basicsCode;

    @Column(name = "REMARK_",columnDefinition="TEXT")
    @Schema(description = "备注内容")
    private String remark;

    @Column(name = "FILL_PEOPLE_")
    @Schema(description = "填写人")
    @Dict(dicCode = "username", dicEntity = User.class, dicText = "nickname")
    private String fillPeople;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "填写日期")
    @Column(name = "FILL_DATE_")
    private java.util.Date fillDate;
}
